<!--
 * @Author: Bonnie
 * @Date: 2022-01-04 18:02:43
 * @LastEditTime: 2022-01-05 16:41:08
 * @LastEditors: Bonnie
 * @Description: flex-1的使用
 * @FilePath: /public_demo/src/views/flex1/index.vue
-->
<template>
  <div class="bbb">
    <div class="test">
      <div class="left-box">左,内容小于宽度</div>
      <div class="center-box">中间, 内容小于宽度</div>
      <div class="right-box">右,内容小于宽度</div>
    </div>
    <div class="test">
      <div class="left-box">左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。左,内容大于宽度。</div>
      <div class="center-box">中间, 内容小于宽度</div>
      <div
        class="right-box"
      >右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。右,内容大于宽度。</div>
    </div>

    <div class="test">
      <div class="left-box">左,内容小于宽度</div>
      <div
        class="center-box"
      >中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。中间,内容小于宽度。</div>
      <div class="right-box">右,内容小于宽度</div>
    </div>
  </div>
</template>
<script>
export default {
  name: "index",
  data() {
    return {};
  }
};
</script>
<style lang='scss' scoped>
.bbb {
  width: 800px;
  padding-left: 100px;
}

.left-box {
  background-color: #e0e0e0;
  width: 200px;
}
.center-box {
  background-color: #d38efa;
  flex: 1;
  padding: 0 20px;
}
.right-box {
  background-color: #d3e8fa;
  width: 200px;
}
.test {
  margin-top: 50px;
  display: flex;
}

.search-item {
  margin-top: 20rpx;
  display: flex;
  align-items: center;

  .avatar {
    width: 80rpx;
    height: 80rpx;
    border-radius: 16rpx;
    overflow: hidden;

    image {
      height: 100%;
      width: 100%;
    }
  }

  .info {
    padding: 0 32rpx;
    box-sizing: border-box;

    .nickname {
      font-size: 36rpx;
      color: #272832;
      font-weight: 400;
    }
  }

  .btn {
    width: 120rpx !important;
    height: 48rpx;
    line-height: 48rpx;
    text-align: center;
    padding: 0;
    font-family: PingFangSC-Regular;
    font-size: 24rpx;
    font-weight: 400;
    border-radius: 24rpx;
    overflow: hidden;

    .sendMsg {
      color: #272832;
      background: #ffe431;
    }

    .add {
      background: rgba(74, 170, 255, 0.1);
      color: #4aaaff;
    }
  }
}
</style>